Various aspects of the present invention relate generally to the linking of object code in a software compiling environment, and specifically to providing alternative resolutions for external symbol references.
In many computer programming environments, a source program component (e.g., a main program, a subroutine, a function, etc.) written in a programming language is translated to create an object module (i.e., object code), which will later be converted by a linker into an executable program. However, in certain cases, the object module cannot be converted directly to an executable program because additional components are needed to provide data conversion, input and output services, and other necessary actions. Thus, the object module will typically contain external references to the names of the required additional components. The object module may also contain external symbol definitions that correspond to external references in other object modules.
When converting an object module to an executable application, the linker attempts to resolve external references, usually by matching the name of the external reference to the name of an external symbol definition. Typically, the linker will search primary object modules for definitions to resolve the external references, and if no definition exists in the primary modules, the linker will search collections of modules, such as libraries or archives, for the definition.
If no references remain unresolved, the resolution process is complete and the resulting executable program is saved for later execution. Alternatively, the executable program is loaded into memory for immediate execution. However, if some references remain unresolved, then those references may be able to be resolved at run-time or the linker may issue an error and not create the executable program.